getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Sat, 12 Jan 2019 19:18:03 +0000 (19:18 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sat, 12 Jan 2019 19:18:03 +0000 (19:18 +0000)
commit57d2c3da3228853b8862432a4e74b68b100d9cae
tree4d8f4159253c6b56db017feecc713dedc981bd3e
parent661848fdc502bd5d10e58dab7731b23e93c7cfa6
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c